﻿Public Class cRectangleMetric

    Private mMinimumX As Double
    Private mMinimumY As Double
    Private mMaximumX As Double
    Private mMaximumY As Double

    Public Sub New(ByVal MinimumX As Double, ByVal MinimumY As Double, ByVal MaximumX As Double, ByVal MaximumY As Double)

        mMinimumX = MinimumX
        mMinimumY = MinimumY
        mMaximumX = MaximumX
        mMaximumY = MaximumY

    End Sub

    Public ReadOnly Property MaximumY() As Double
        Get
            Return mMaximumY
        End Get
    End Property

    Public ReadOnly Property MaximumX() As Double
        Get
            Return mMaximumX
        End Get
    End Property

    Public ReadOnly Property MinimumX() As Double
        Get
            Return mMinimumX
        End Get
    End Property

    Public ReadOnly Property MinimumY() As Double
        Get
            Return mMinimumY
        End Get
    End Property

    Public ReadOnly Property Area() As Double
        Get
            Return Height * Width
        End Get
    End Property

    Public ReadOnly Property Height() As Double
        Get
            Return mMaximumY - mMinimumY
        End Get
    End Property

    Public ReadOnly Property Width() As Double
        Get
            Return mMaximumX - mMinimumX
        End Get
    End Property

    'Public Function DeriveDrawingRectangle() As System.gr

End Class


